Machine learning has been widely applied to the technical fields of big data, image recognition, voice recognition, and so on. However, as regards the detection of characters in images, because currently existing annotation samples are generally word level annotation samples and cannot participate in the training of a machine learning model for character detection, the machine learning model for character detection cannot be fully trained, and consequently characters in images cannot be precisely detected. In addition, only samples that satisfy strict annotation requirements can participate in training, further reducing the number of annotation samples that can participate training.